From e79bd5b63bc89a3fdb2c7529931d784cf8c436f5 Mon Sep 17 00:00:00 2001 From: "mafetter@fleming.research" Date: Mon, 4 Apr 2005 10:52:11 +0000 Subject: [PATCH] bitkeeper revision 1.1266 (42511c5bb2cYQH5revHQWgKY0haDHg) Rename translate_gpfn_to_mfn to gpfn_to_mfn_foreign. Minor bug fix from prior merges. Signed-off-by: michael.fetterman@cl.cam.ac.uk --- xen/arch/x86/shadow.c | 12 ++++++------ xen/common/grant_table.c | 2 +- xen/include/asm-x86/shadow.h | 8 ++++---- xen/include/xen/perfc_defn.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xen/arch/x86/shadow.c b/xen/arch/x86/shadow.c index fe9a009e17..910664d782 100644 --- a/xen/arch/x86/shadow.c +++ b/xen/arch/x86/shadow.c @@ -1245,11 +1245,11 @@ void vmx_shadow_clear_state(struct domain *d) } unsigned long -translate_gpfn_to_mfn(struct domain *d, unsigned long gpfn) +gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn) { ASSERT( shadow_mode_translate(d) ); - perfc_incrc(translate_gpfn_to_mfn); + perfc_incrc(gpfn_to_mfn_foreign); unsigned long va = gpfn << PAGE_SHIFT; unsigned long phystab = pagetable_val(d->arch.phys_table); @@ -1258,7 +1258,7 @@ translate_gpfn_to_mfn(struct domain *d, unsigned long gpfn) unmap_domain_mem(l2); if ( !(l2_pgentry_val(l2e) & _PAGE_PRESENT) ) { - printk("translate_gpfn_to_mfn(d->id=%d, gpfn=%p) => 0 l2e=%p\n", + printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => 0 l2e=%p\n", d->id, gpfn, l2_pgentry_val(l2e)); return INVALID_MFN; } @@ -1268,13 +1268,13 @@ translate_gpfn_to_mfn(struct domain *d, unsigned long gpfn) unmap_domain_mem(l1); #if 0 - printk("translate_gpfn_to_mfn(d->id=%d, gpfn=%p) => %p phystab=%p l2e=%p l1tab=%p, l1e=%p\n", + printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => %p phystab=%p l2e=%p l1tab=%p, l1e=%p\n", d->id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, phystab, l2e, l1tab, l1e); #endif if ( !(l1_pgentry_val(l1e) & _PAGE_PRESENT) ) { - printk("translate_gpfn_to_mfn(d->id=%d, gpfn=%p) => 0 l1e=%p\n", + printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => 0 l1e=%p\n", d->id, gpfn, l1_pgentry_val(l1e)); return INVALID_MFN; } @@ -2852,7 +2852,7 @@ int _check_all_pagetables(struct exec_domain *ed, char *s) BUG(); // XXX - ought to fix this... break; case PGT_snapshot: - case PGT_writable_ref: + case PGT_writable_pred: break; default: errors++; diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index fceee60984..30cdd5886a 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -193,7 +193,7 @@ __gnttab_map_grant_ref( /* rmb(); */ /* not on x86 */ - frame = __translate_gpfn_to_mfn(rd, sha->frame); + frame = __gpfn_to_mfn_foreign(rd, sha->frame); if ( unlikely(!pfn_is_ram(frame)) || unlikely(!((flags & GNTMAP_readonly) ? diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h index 739f65e48f..e5916536eb 100644 --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -190,12 +190,12 @@ static inline void shadow_mode_disable(struct domain *d) phys_to_machine_mapping(gpfn); }) \ : (gpfn) ) -#define __translate_gpfn_to_mfn(_d, gpfn) \ +#define __gpfn_to_mfn_foreign(_d, gpfn) \ ( (shadow_mode_translate(_d)) \ - ? translate_gpfn_to_mfn(_d, gpfn) \ + ? gpfn_to_mfn_foreign(_d, gpfn) \ : (gpfn) ) -extern unsigned long translate_gpfn_to_mfn( +extern unsigned long gpfn_to_mfn_foreign( struct domain *d, unsigned long gpfn); /************************************************************************/ @@ -661,7 +661,7 @@ static inline void hl2e_propagate_from_guest( // This isn't common -- it only happens during shadow mode setup // and mode changes. // - mfn = translate_gpfn_to_mfn(d, pfn); + mfn = gpfn_to_mfn_foreign(d, pfn); } else mfn = __gpfn_to_mfn(d, pfn); diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h index 318882a670..0d5b146432 100644 --- a/xen/include/xen/perfc_defn.h +++ b/xen/include/xen/perfc_defn.h @@ -98,7 +98,7 @@ PERFCOUNTER_CPU(shadow_get_page_fail, "shadow_get_page_from_l1e fails" ) PERFCOUNTER_CPU(validate_hl2e_calls, "calls to validate_hl2e_change") PERFCOUNTER_CPU(validate_hl2e_changes, "validate_hl2e makes changes") PERFCOUNTER_CPU(exception_fixed, "pre-exception fixed") -PERFCOUNTER_CPU(translate_gpfn_to_mfn, "calls to translate_gpfn_to_mfn") +PERFCOUNTER_CPU(gpfn_to_mfn_foreign, "calls to gpfn_to_mfn_foreign") PERFCOUNTER_CPU(remove_write_access, "calls to remove_write_access") PERFCOUNTER_CPU(remove_write_access_easy, "easy outs of remove_write_access") PERFCOUNTER_CPU(remove_write_no_work, "no work in remove_write_access") -- 2.30.2